package com.dmw.month_lx.entity;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.Max;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.Length;

public class PayBill {

	private Integer id;
	
	@NotBlank(message = "编号不能为空")
	private String code;
	
	@NotBlank(message = "名称不能为空")
	private String name;
	private Integer companyId;
	
	private Integer businessId;
	
	private Integer deptId;

	@NotNull(message = "不能为空")
	@DecimalMin(value = "999",message = "最低不能低于3位")
	@DecimalMax(value = "9999999999",message = "最长不能超过10位")
	private BigDecimal acount;
	
	private String bills;
	
	private Date createtime;
	
	//扩展字段
	private List<User> users;
	
	private String companyName;
	
	private String businessName;
	
	private String deptName;	
	

	
	public String getCompanyName() {
		return companyName;
	}

	public void setCompanyName(String companyName) {
		this.companyName = companyName;
	}

	public String getBusinessName() {
		return businessName;
	}

	public void setBusinessName(String businessName) {
		this.businessName = businessName;
	}

	public String getDeptName() {
		return deptName;
	}

	public void setDeptName(String deptName) {
		this.deptName = deptName;
	}

	public List<User> getUsers() {
		return users;
	}

	public void setUsers(List<User> users) {
		this.users = users;
	}

	public PayBill() {
		super();
		// TODO Auto-generated constructor stub
	}

	public PayBill(Integer id, String code, String name, Integer companyId, Integer businessId, Integer deptId,
			BigDecimal acount, String bills, Date createtime) {
		super();
		this.id = id;
		this.code = code;
		this.name = name;
		this.companyId = companyId;
		this.businessId = businessId;
		this.deptId = deptId;
		this.acount = acount;
		this.bills = bills;
		this.createtime = createtime;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Integer getCompanyId() {
		return companyId;
	}

	public void setCompanyId(Integer companyId) {
		this.companyId = companyId;
	}

	public Integer getBusinessId() {
		return businessId;
	}

	public void setBusinessId(Integer businessId) {
		this.businessId = businessId;
	}

	public Integer getDeptId() {
		return deptId;
	}

	public void setDeptId(Integer deptId) {
		this.deptId = deptId;
	}

	public BigDecimal getAcount() {
		return acount;
	}

	public void setAcount(BigDecimal acount) {
		this.acount = acount;
	}

	public String getBills() {
		return bills;
	}

	public void setBills(String bills) {
		this.bills = bills;
	}

	public Date getCreatetime() {
		return createtime;
	}

	public void setCreatetime(Date createtime) {
		this.createtime = createtime;
	}

	@Override
	public String toString() {
		return "PayBill [id=" + id + ", code=" + code + ", name=" + name + ", companyId=" + companyId + ", businessId="
				+ businessId + ", deptId=" + deptId + ", acount=" + acount + ", bills=" + bills + ", createtime="
				+ createtime + "]";
	}
	
	
}
